<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
    <div id="app">
      <h2>{{title}}</h2>
      <button v-on:click="flag = !flag">点击切换</button>
      <p v-if="flag" key="a">用户名<input type="text" /></p>
      <p v-else key="b">密码<input type="text" /></p>
      <ul>
        <li v-for="(val, idx) in msg" v-bind:key="idx">{{idx}} - {{val}}</li>
      </ul>
    </div>
	</body>
  <script src="../vue.js"></script>
  <script>
    new Vue({
      el:"#app",
      data:{
        title:"hello 列表渲染",
        flag:true,
        msg:["张三","张三"]
      }
    })
  </script>
</html>
